package org.easiermock.invocationhandlers;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * A simple adapter from the <code>java.lang.reflect.InvocationHandler</code> interface to the
 * <code>net.sf.cglib.proxy.InvocationHandler</code> interface.
 * 
 * @author Neil Fuller
 */
public class CglibInvocationHandlerAdapter implements net.sf.cglib.proxy.InvocationHandler {

	private InvocationHandler delegate;
	
	public CglibInvocationHandlerAdapter(InvocationHandler delegate) {
		this.delegate = delegate;
	}

	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		return delegate.invoke(proxy, method, args);
	}
}

